This is a fairly convoluted program, and there are a number of problems. Most basically, you're not using argc to check how many arguments to process. Rather, you just keep on converting argv elements until you find one that is less than 1 or greater than 9. What happens if the user doesn't enter an invalid entry? Well, you wind up calling atoi(NULL) which is invalid (NULL is the last entry in argv). You also seem to be trying to run the program with arguments that are larger than 9, but your do/while loop only accepts arguments between 1 and 9, inclusive. Is that what you want? In addition, after initializing args_main to zeroes, you forget to reset control_1 to zero, so instead of putting the converted argv elements into args_main[0], args_main[1], and so on, you place them beyond the end of the array (since control_1 is 128 after your initialization loop). Also, your use of args_main_p is not right. You don't actually use it for anything, but when you allocate memory with malloc(), you're overwriting its old value, which you appear to have set with a reason.

I'll show you an example of a cleaner way to do what it seems you're doing:
Code:
#include <stdlib.h>
#include <stdio.h>

#define MAX 128

int main(int argc, char **argv)
{
  int args_main[MAX] = { 0 }; /* This sets all elements to zero. */
  int i;

  for(i = 1; i < argc; i++)
  {
    /* The arguments in argv start at 1, so subtract 1 when storing
     * to args_main so that it starts at 0.
     */
    args_main[i - 1] = atoi(argv[i]);

    /* I'm not sure what your criteria are; this stops when a 0 or
     * negative argument is found.
     */
    if(args_main[i - 1] < 1) break;
  }

  /* I assume 0 is a terminating value. */
  for(i = 0; args_main[i] != 0; i++)
  {
    printf("%d ", args_main[i]);
  }
  putchar('\n');

  return 0;
}
There are problems with this code, such as the fact that args_main might overflow (if too many command-line arguments are given), and atoi() is not a safe function. But you get the idea, I hope.